<!DOCTYPE html>  
<html>  
  <head>  
    <title>Class Methods</title>  
  </head>
  <body>  
    <script type="text/javascript">
      class Car  
      {  
        // Create a fullThrottle() method
        fullThrottle() {
          document.write("The car is going as fast as it can!<br>");
        }

        // Create a speed() method and add a parameter
        speed(maxSpeed) {
          document.write("Max speed is: " + maxSpeed + "<br>");
        }

        // Static method
        static myStaticMethod() {
          document.write("Static methods can be called without creating objects<br>");
        }
      };
      
      Car.myStaticMethod(); // Call the static method

      var myCar = new Car(); // Create a myCar object
      myCar.fullThrottle(); // Call the fullThrottle() method
      myCar.speed(200); // Call the speed() method
    </script> 
  </body>  
</html>